home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / v cisle / htttrack / httrack-3.41-3.exe / {app} / src / htscache.h < prev    next >
C/C++ Source or Header  |  2006-08-15  |  3KB  |  91 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: httrack.c subroutines:                                 */
  34. /*       cache system (index and stores files in cache)         */
  35. /* Author: Xavier Roche                                         */
  36. /* ------------------------------------------------------------ */
  37.  
  38.  
  39.  
  40. #ifndef HTSCACHE_DEFH
  41. #define HTSCACHE_DEFH 
  42.  
  43. /* Library internal definictions */
  44. #ifdef HTS_INTERNAL_BYTECODE
  45.  
  46. #include "htsglobal.h"
  47.  
  48. #include <stdlib.h>
  49.  
  50. /* Forward definitions */
  51. #ifndef HTS_DEF_FWSTRUCT_httrackp
  52. #define HTS_DEF_FWSTRUCT_httrackp
  53. typedef struct httrackp httrackp;
  54. #endif
  55. #ifndef HTS_DEF_FWSTRUCT_cache_back
  56. #define HTS_DEF_FWSTRUCT_cache_back
  57. typedef struct cache_back cache_back;
  58. #endif
  59. #ifndef HTS_DEF_FWSTRUCT_htsblk
  60. #define HTS_DEF_FWSTRUCT_htsblk
  61. typedef struct htsblk htsblk;
  62. #endif
  63.  
  64. // cache
  65. void cache_mayadd(httrackp* opt,cache_back* cache,htsblk* r,const char* url_adr,const char* url_fil,const char* url_save);
  66. void cache_add(httrackp* opt,cache_back* cache,const htsblk *r,const char* url_adr,const char* url_fil,const char* url_save,int all_in_cache,const char* path_prefix);
  67. htsblk cache_read(httrackp* opt,cache_back* cache,const char* adr,const char* fil,const char* save,char* location);
  68. htsblk cache_read_ro(httrackp* opt,cache_back* cache,const char* adr,const char* fil,const char* save,char* location);
  69. htsblk cache_readex(httrackp* opt,cache_back* cache,const char* adr,const char* fil,const char* save,char* location,char* return_save,int readonly);
  70. htsblk* cache_header(httrackp* opt,cache_back* cache,const char* adr,const char* fil,htsblk* r);
  71. void cache_init(cache_back* cache,httrackp* opt);
  72.  
  73. int cache_writedata(FILE* cache_ndx,FILE* cache_dat,const char* str1,const char* str2,char* outbuff,int len);
  74. int cache_readdata(cache_back* cache,const char* str1,const char* str2,char** inbuff,int* len);
  75.  
  76. void cache_rstr(FILE* fp,char* s);
  77. char* cache_rstr_addr(FILE* fp);
  78. int  cache_brstr(char* adr,char* s);
  79. int  cache_quickbrstr(char* adr,char* s);
  80. int cache_brint(char* adr,int* i);
  81. void cache_rint(FILE* fp,int* i);
  82. void cache_rLLint(FILE* fp,LLint* i);
  83.  
  84. int cache_wstr(FILE* fp,const char* s);
  85. int cache_wint(FILE* fp,int i);
  86. int cache_wLLint(FILE* fp,LLint i);
  87.  
  88. #endif
  89.  
  90. #endif
  91.